#pragma warning(disable:4996)
#include<stdio.h>
#include<stdlib.h>
int main()
{
    FILE* pFile;
    int n;
    char name[100];

    pFile = fopen("myfile.txt", "w");
    for (n = 0; n < 3; n++)
    {
        puts("please, enter a name: ");
        gets(name);
        fprintf(pFile, "Name %d [%-10.10s]\n", n + 1, name);
    }
    fclose(pFile);
	return 0;
}